/**********************************************************
    COPYRIGHT
        KND, Inc. (c) 2011
    CLASS NAME
        platform_gpio.h
    DEPENDENCY

    HISTORY
		09/15/2011, created by Guangxing Liu
**********************************************************/
#ifndef PLATFORM_GPIO_H
#define PLATFORM_GPIO_H

#define GPIO_DEVICE           	 "GPIO"

#define GPIO_DIR_INPUT   (0)
#define GPIO_DIR_OUTPUT (1)

#define platform_gpio_app_call_device_op_setiodir     	"0_setiodir"
#define platform_gpio_app_call_device_op_setiovalue       "1_setiovalue"
#define platform_gpio_app_call_device_op_getiovalue       "2_getiovalue"



typedef enum{
	Platform_Gpio_App_Call_None = 0,
	Platform_Gpio_App_Call_SetioDir,
	Platform_Gpio_App_Call_SetioValue,
	Platform_Gpio_App_Call_GetioValue,

}platform_gpio_device_opt;

typedef struct _platform_gpio_app_call_
{
	platform_gpio_device_opt iOpt;
	
}platform_gpio_app_call;


typedef struct _platform_gpio_setdir_
{
	unsigned char dir;
	unsigned char gpio_num;
	union{
		unsigned char gpio_pin;
		int gpio_pannel;
		}gpio;
	
}platform_gpio_setdir;

typedef struct _platform_gpio_setvalue_
{
	unsigned char value;
	unsigned char gpio_num;
	union{
		unsigned char gpio_pin;
		int gpio_pannel;
		}gpio;
	
}platform_gpio_setvalue;


enum{	
	PORT_GPIO0,
	PORT_GPIO1,
	PORT_GPIO2,
	PORT_GPIO3,
	PORT_GPIO4,
	PORT_GPIO5
};






























#endif

